package syntax

import scala.collection.mutable.ArrayBuffer

class CAlternatives
{
    private val value = ArrayBuffer[CChain]()

    def apply():Seq[CChain] = value

    def |(category:CCategory):CAlternatives =
    {
        this | CChain(category)
        this
    }

    def |(chain:CChain):CAlternatives =
    {
        value += chain
        this
    }
}

object CAlternatives
{
    def apply() = new CAlternatives
}
